<?php

define("PATH",__DIR__);
require  "function.php";
require PATH."/DB/DB.php";



$info=C('database');

//var_dump($info['host']);

$DB=new DB();
$info=$DB->columnDB('admininfo');

$SelectArrString='
<?php
    return [
        content
    ];
';

//echo $SelectArrString;
$temp="";
foreach ($info as $item) {

    $temp.="            '{$item}'=>'',\n";
    
}

$SelectArrString=str_replace("content","$temp",$SelectArrString);

//file_put_contents(PATH."/temp/select.php",$SelectArrString);
//file_put_contents(PATH."/temp/where.php",$SelectArrString);
//file_put_contents(PATH."/temp/order.php",$SelectArrString);
file_put_contents(PATH."/temp/add.php",$SelectArrString);




var_dump($SelectArrString);
//$zhi=$DB->query('select * from admininfo');
//var_dump($zhi);



